package bankingSystemServer;

import java.util.Observable;
import java.util.Observer;

/**
 * an interface for Server
 */
public abstract class ServerInterface implements Observer {

	Server server;

	public abstract void run();

	/**
	 * creates a ServerInterface object
	 */
	public ServerInterface(int option) {

		switch (option) {
		case 1:
			server = new SingleThreadServer();
			break;
		case 2:
			server = new DynamicCreationServer();
			break;
		case 3:
			server = new HalfSyncHalfAsyncServer();
			break;
		case 4:
			server = new LeaderFollowerServer();
			break;
		default:
			server = new SingleThreadServer();
		}

	}

	@Override
	public void update(Observable o, Object arg) {
		// TODO Auto-generated method stub

	}

}
